<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateSupplyTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <p:panel header="Fornecedor" >
                    <p:panelGrid columns="2">
                        <f:facet name="header">
                            <h:outputText value="Cadastro de Novo Fornecedor" />
                        </f:facet>
                        <f:facet name="footer" >
                            <h:outputText value="WebApplication  "   />  <p:commandButton action="#{supplyController.create}" value="#{bundle.CreateSupplySaveLink}" />
                        </f:facet>

                        <h:outputLabel value="#{bundle.CreateSupplyLabel_name}" for="name" />
                        <h:inputText id="name" value="#{supplyController.selected.name}" title="#{bundle.CreateSupplyTitle_name}" />

                        <h:outputLabel value="#{bundle.CreateSupplyLabel_numer}" for="numer" />
                        <h:inputText id="numer" value="#{supplyController.selected.numer}" title="#{bundle.CreateSupplyTitle_numer}" />
                        
                        <p:outputLabel value="#{bundle.CreateAddressLabel_street}" for="street" />
                        <h:inputText id="street" value="#{supplyController.add.street}" title="#{bundle.CreateAddressTitle_street}" />
                        <h:outputLabel value="#{bundle.CreateAddressLabel_city}" for="city" />
                        <h:inputText id="city" value="#{supplyController.add.city}" title="#{bundle.CreateAddressTitle_city}" />
                        <h:outputLabel value="#{bundle.CreateAddressLabel_stateORprovince}" for="stateORprovince" />
                        <h:inputText id="stateORprovince" value="#{supplyController.add.stateORprovince}" title="#{bundle.CreateAddressTitle_stateORprovince}" />
                        <h:outputLabel value="#{bundle.CreateAddressLabel_postalCode}" for="postalCode" />
                        <h:inputText id="postalCode" value="#{supplyController.add.postalCode}" title="#{bundle.CreateAddressTitle_postalCode}" />
                        <h:outputLabel value="#{bundle.CreateAddressLabel_contry}" for="contry" />
                        <h:inputText id="contry" value="#{supplyController.add.contry}" title="#{bundle.CreateAddressTitle_contry}" />

                    </p:panelGrid>
                    <br />

                    <br />
                    <br />
                    <h:link outcome="/home" value="#{bundle.CreateSupplyIndexLink}"/>
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
